import { S } from '../../s';
import { IPSAppView } from '../../app/view/ipsapp-view';
import { IPSNavigateContext } from '../ipsnavigate-context';
import { IPSNavigateParam } from '../ipsnavigate-param';
import { IPSDETreeNodeRV } from './ipsdetree-node-rv';
import { PSModelObjectImpl } from '../../psmodel-object-impl';

export class PSDETreeNodeRVImpl
  extends PSModelObjectImpl
  implements IPSDETreeNodeRV
{
  protected psnavigatecontexts: IPSNavigateContext[];
  getPSNavigateContexts(): IPSNavigateContext[] | null {
    return (
      this.psnavigatecontexts ||
      (this.psnavigatecontexts = this.fillChildListModel(
        this.M.getPSNavigateContexts,
        S._8c,
      ) as IPSNavigateContext[])
    );
  }

  findPSNavigateContext(objKey: any): IPSNavigateContext | null {
    return this.getPSModel5(
      S._8c,
      this.getPSNavigateContexts(),
      objKey,
    ) as IPSNavigateContext;
  }

  protected psnavigateparams: IPSNavigateParam[];
  getPSNavigateParams(): IPSNavigateParam[] | null {
    return (
      this.psnavigateparams ||
      (this.psnavigateparams = this.fillChildListModel(
        this.M.getPSNavigateParams,
        S._8a,
      ) as IPSNavigateParam[])
    );
  }

  findPSNavigateParam(objKey: any): IPSNavigateParam | null {
    return this.getPSModel5(
      S._8a,
      this.getPSNavigateParams(),
      objKey,
    ) as IPSNavigateParam;
  }

  protected refpsappview: IPSAppView;
  getRefPSAppView(): IPSAppView | null {
    return (
      this.refpsappview ||
      (this.refpsappview = this.fillObjectModel(
        S._1e,
        this.M.getRefPSAppView,
        S._2af,
      ) as IPSAppView)
    );
  }
  get cls(): string {
    return 'PSDETreeNodeRVImpl';
  }
  instanceof(cls: string): boolean {
    if (cls == S._7 || cls == S._39a) return true;
    return super.instanceof(cls);
  }
}
